<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qclkernel.cpp -->
  <title>QCLKernel Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <script src="./scripts/superfish.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />  <script src="./scripts/narrow.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->
</head>
<body class="" onload="CheckEmptyAndLoadList();">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="150"><img src="images/qt-logo.png" align="left" border="0" />&nbsp;&nbsp;<img src="images/qtopencl-logo.png" border="0" /></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"> <a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="qtopencl-all-classes.html"><font color="#004faf">All Classes</font></a></td>
</table>              <li><a href="modules.html">Modules</a></li>              <li>QtCL</li>
              <li>QCLKernel</li>
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#executing-kernels">Executing kernels</a></li>
<li class="level2"><a href="#asynchronous-execution">Asynchronous execution</a></li>
<li class="level2"><a href="#kernels-and-qtconcurrent">Kernels and QtConcurrent</a></li>
</ul>
</div>
<h1 class="title">QCLKernel Class Reference</h1>
<!-- $$$QCLKernel-brief -->
<p>The QCLKernel class represents an executable entry point function in an OpenCL program. <a href="#details">More...</a></p>
<!-- @@@QCLKernel -->
<pre class="highlightedCode brush: cpp">    #include &lt;QCLKernel&gt;</pre><p>This class was introduced in QtOpenCL 4.7.</p>
<ul>
<li><a href="qclkernel-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#QCLKernel">QCLKernel</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#QCLKernel-2">QCLKernel</a></b> ( QCLContext * <i>context</i>, cl_kernel <i>id</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#QCLKernel-3">QCLKernel</a></b> ( const QCLKernel &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#dtor.QCLKernel">~QCLKernel</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#argCount">argCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLWorkSize </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#bestLocalWorkSizeImage2D">bestLocalWorkSizeImage2D</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLWorkSize </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#bestLocalWorkSizeImage3D">bestLocalWorkSizeImage3D</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLContext * </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#context">context</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLWorkSize </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#declaredWorkGroupSize">declaredWorkGroupSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLWorkSize </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#declaredWorkGroupSize-2">declaredWorkGroupSize</a></b> ( const QCLDevice &amp; <i>device</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLWorkSize </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#globalWorkSize">globalWorkSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#isNull">isNull</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> cl_kernel </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#kernelId">kernelId</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLWorkSize </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#localWorkSize">localWorkSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#name">name</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> size_t </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#preferredWorkSizeMultiple">preferredWorkSizeMultiple</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLProgram </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#program">program</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLEvent </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#run">run</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLEvent </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#run-2">run</a></b> ( const QCLEventList &amp; <i>after</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QFuture&lt;void&gt; </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#runInThread">runInThread</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg">setArg</a></b> ( int <i>index</i>, cl_int <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg-2">setArg</a></b> ( int <i>index</i>, cl_uint <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg-3">setArg</a></b> ( int <i>index</i>, cl_long <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg-4">setArg</a></b> ( int <i>index</i>, cl_ulong <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg-5">setArg</a></b> ( int <i>index</i>, float <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg-6">setArg</a></b> ( int <i>index</i>, const QVector2D &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg-7">setArg</a></b> ( int <i>index</i>, const QVector3D &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg-8">setArg</a></b> ( int <i>index</i>, const QVector4D &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg-9">setArg</a></b> ( int <i>index</i>, const QColor &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg-10">setArg</a></b> ( int <i>index</i>, Qt::GlobalColor <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg-11">setArg</a></b> ( int <i>index</i>, const QPoint &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg-12">setArg</a></b> ( int <i>index</i>, const QPointF &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg-13">setArg</a></b> ( int <i>index</i>, const QMatrix4x4 &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg-14">setArg</a></b> ( int <i>index</i>, const QCLMemoryObject &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg-15">setArg</a></b> ( int <i>index</i>, const QCLVector&lt;T&gt; &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg-16">setArg</a></b> ( int <i>index</i>, const QCLSampler &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setArg-17">setArg</a></b> ( int <i>index</i>, const void * <i>data</i>, size_t <i>size</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setGlobalWorkSize">setGlobalWorkSize</a></b> ( const QCLWorkSize &amp; <i>size</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setGlobalWorkSize-2">setGlobalWorkSize</a></b> ( size_t <i>width</i>, size_t <i>height</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setGlobalWorkSize-3">setGlobalWorkSize</a></b> ( size_t <i>width</i>, size_t <i>height</i>, size_t <i>depth</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setLocalWorkSize">setLocalWorkSize</a></b> ( const QCLWorkSize &amp; <i>size</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setLocalWorkSize-2">setLocalWorkSize</a></b> ( size_t <i>width</i>, size_t <i>height</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setLocalWorkSize-3">setLocalWorkSize</a></b> ( size_t <i>width</i>, size_t <i>height</i>, size_t <i>depth</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setRoundedGlobalWorkSize">setRoundedGlobalWorkSize</a></b> ( const QCLWorkSize &amp; <i>size</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setRoundedGlobalWorkSize-2">setRoundedGlobalWorkSize</a></b> ( size_t <i>width</i>, size_t <i>height</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#setRoundedGlobalWorkSize-3">setRoundedGlobalWorkSize</a></b> ( size_t <i>width</i>, size_t <i>height</i>, size_t <i>depth</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#operator-not-eq">operator!=</a></b> ( const QCLKernel &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLEvent </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#operator-28-29">operator()</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLEvent </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#operator-28-29-2">operator()</a></b> ( const T1 &amp; <i>arg1</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLEvent </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#operator-28-29-3">operator()</a></b> ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLEvent </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#operator-28-29-4">operator()</a></b> ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i>, const T3 &amp; <i>arg3</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLEvent </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#operator-28-29-5">operator()</a></b> ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i>, const T3 &amp; <i>arg3</i>, const T4 &amp; <i>arg4</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLEvent </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#operator-28-29-6">operator()</a></b> ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i>, const T3 &amp; <i>arg3</i>, const T4 &amp; <i>arg4</i>, const T5 &amp; <i>arg5</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLEvent </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#operator-28-29-7">operator()</a></b> ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i>, const T3 &amp; <i>arg3</i>, const T4 &amp; <i>arg4</i>, const T5 &amp; <i>arg5</i>, const T6 &amp; <i>arg6</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLEvent </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#operator-28-29-8">operator()</a></b> ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i>, const T3 &amp; <i>arg3</i>, const T4 &amp; <i>arg4</i>, const T5 &amp; <i>arg5</i>, const T6 &amp; <i>arg6</i>, const T7 &amp; <i>arg7</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLEvent </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#operator-28-29-9">operator()</a></b> ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i>, const T3 &amp; <i>arg3</i>, const T4 &amp; <i>arg4</i>, const T5 &amp; <i>arg5</i>, const T6 &amp; <i>arg6</i>, const T7 &amp; <i>arg7</i>, const T8 &amp; <i>arg8</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLEvent </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#operator-28-29-10">operator()</a></b> ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i>, const T3 &amp; <i>arg3</i>, const T4 &amp; <i>arg4</i>, const T5 &amp; <i>arg5</i>, const T6 &amp; <i>arg6</i>, const T7 &amp; <i>arg7</i>, const T8 &amp; <i>arg8</i>, const T9 &amp; <i>arg9</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLEvent </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#operator-28-29-11">operator()</a></b> ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i>, const T3 &amp; <i>arg3</i>, const T4 &amp; <i>arg4</i>, const T5 &amp; <i>arg5</i>, const T6 &amp; <i>arg6</i>, const T7 &amp; <i>arg7</i>, const T8 &amp; <i>arg8</i>, const T9 &amp; <i>arg9</i>, const T10 &amp; <i>arg10</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLKernel &amp; </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#operator-eq">operator=</a></b> ( const QCLKernel &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclkernel.html#operator-eq-eq">operator==</a></b> ( const QCLKernel &amp; <i>other</i> ) const</td></tr>
</table>
<a name="details"></a>
<!-- $$$QCLKernel-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QCLKernel class represents an executable entry point function in an OpenCL program.</p>
<a name="executing-kernels"></a>
<h3>Executing kernels</h3>
<p>QCLKernel corresponds to an instance of an OpenCL kernel, decorated with a specific <a href="qclkernel.html#globalWorkSize">globalWorkSize</a>() and <a href="qclkernel.html#localWorkSize">localWorkSize</a>(). It is possible to use the same OpenCL kernel with different work sizes by altering the size for each execution request:</p>
<pre class="highlightedCode brush: cpp">    QCLKernel kernel = program.createKernel(&quot;foo&quot;);

    kernel.setGlobalWorkSize(100, 100);
    kernel.setArg(0, a1);
    kernel.setArg(1, b1);
    kernel.run();

    kernel.setGlobalWorkSize(200, 200);
    kernel.setArg(0, a2);
    kernel.setArg(1, b2);
    kernel.run();</pre>
<p>Alternatively, operator()() can be used to avoid the <a href="qclkernel.html#setArg">setArg</a>() calls:</p>
<pre class="highlightedCode brush: cpp">    QCLKernel kernel = program.createKernel(&quot;foo&quot;);

    kernel.setGlobalWorkSize(100, 100);
    kernel(a1, b1);

    kernel.setGlobalWorkSize(200, 200);
    kernel(a2, b2);</pre>
<p>Up to 10 arguments can be provided to operator()(). Use explicit <a href="qclkernel.html#setArg">setArg</a>() and <a href="qclkernel.html#run">run</a>() calls with kernels that have more than 10 arguments.</p>
<p>The following types are handled specially via <a href="qclkernel.html#setArg">setArg</a>() and operator()(): <tt>cl_int</tt>, <tt>cl_uint</tt>, <tt>cl_long</tt>, <tt>cl_ulong</tt>, <tt>float</tt>, QVector2D, QVector3D, QVector4D, QPointF, QPoint, QMatrix4x4, <a href="qclbuffer.html">QCLBuffer</a>, <a href="qclimage2d.html">QCLImage2D</a>, <a href="qclimage3d.html">QCLImage3D</a>, <a href="qclvector.html">QCLVector</a>, and <a href="qclsampler.html">QCLSampler</a>. Other argument types must be set explicitly by calling the <a href="qclkernel.html#setArg">setArg</a>() override that takes a buffer and size.</p>
<a name="asynchronous-execution"></a>
<h3>Asynchronous execution</h3>
<p>Note that both <a href="qclkernel.html#run">run</a>() and operator()() return immediately; they will not block until execution is finished. Both functions return a <a href="qclevent.html">QCLEvent</a> object that can be used to wait for the request to finish:</p>
<pre class="highlightedCode brush: cpp">    kernel.setGlobalWorkSize(100, 100);
    QCLEvent event = kernel(a1, b1);
    event.waitForFinished();</pre>
<p>Usually it isn't necessary for an explicit <a href="qclevent.html">QCLEvent</a> wait because the next OpenCL request will implicitly block until the kernel finishes execution:</p>
<pre class="highlightedCode brush: cpp">    QCLBuffer buffer = ...;

    kernel.setGlobalWorkSize(100, 100);
    kernel(buffer);

    buffer.read(...);</pre>
<p>With the default in-order command execution policy, OpenCL will ensure that the <a href="qclbuffer.html#read">QCLBuffer::read</a>() request will not begin execution until the kernel execution finishes.</p>
<a name="kernels-and-qtconcurrent"></a>
<h3>Kernels and QtConcurrent</h3>
<p><a href="qtconcurrent.html#run">QtConcurrent::run</a>() can also be used to execute a kernel:</p>
<pre class="highlightedCode brush: cpp">    kernel.setGlobalWorkSize(100, 100);
    QFuture&lt;void&gt; future = QtConcurrent::run(kernel, a1, b1);
    future.waitForFinished();</pre>
<p>This will create a background thread on the main CPU to enqueue the kernel for execution and to wait for the kernel to complete.</p>
<p>Only 5 arguments can be passed to a kernel using <a href="qtconcurrent.html#run">QtConcurrent::run</a>(), which is the same as for regular functions and QtConcurrent. Use explicit <a href="qclkernel.html#setArg">setArg</a>() calls and <a href="qclkernel.html#runInThread">runInThread</a>() for kernels with more than 5 arguments.</p>
<p>Because kernels do not have return values, <a href="qtconcurrent.html#run">QtConcurrent::run</a>() on a QCLKernel will always return a QFuture&lt;void&gt;.</p>
<p>The main advantage of QFuture&lt;void&gt; compared to <a href="qclevent.html">QCLEvent</a> is that it can be used with QFutureWatcher to receive signal notification of when a kernel completes execution:</p>
<pre class="highlightedCode brush: cpp">    QFutureWatcher&lt;void&gt; *watcher = new QFutureWatcher&lt;void&gt;(this);
    watcher-&gt;setFuture(QtConcurrent::run(kernel, a1, b1));
    connect(watcher, SIGNAL(finished()), this, SLOT(eventFinished()));</pre>
<p><a href="qclevent.html">QCLEvent</a> objects can be implicitly converted into a QFuture&lt;void&gt;, so any function that returns a <a href="qclevent.html">QCLEvent</a> can be used with QFutureWatcher.</p>
</div>
<p>See also <a href="qclprogram.html">QCLProgram</a> and <a href="concurrent.html">OpenCL and QtConcurrent</a>.</p>
<!-- @@@QCLKernel -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCLKernel[overload1]$$$QCLKernel -->
<h3 class="fn"><a name="QCLKernel"></a>QCLKernel::QCLKernel ()</h3>
<p>Constructs a null OpenCL kernel object.</p>
<!-- @@@QCLKernel -->
<!-- $$$QCLKernel$$$QCLKernelQCLContext*cl_kernel -->
<h3 class="fn"><a name="QCLKernel-2"></a>QCLKernel::QCLKernel ( <a href="qclcontext.html">QCLContext</a> * <i>context</i>, cl_kernel <i>id</i> )</h3>
<p>Constructs an OpenCL kernel object from the native identifier <i>id</i>, and associates it with <i>context</i>. This class will take over ownership of <i>id</i> and release it in the destructor.</p>
<!-- @@@QCLKernel -->
<!-- $$$QCLKernel$$$QCLKernelconstQCLKernel& -->
<h3 class="fn"><a name="QCLKernel-3"></a>QCLKernel::QCLKernel ( const QCLKernel &amp; <i>other</i> )</h3>
<p>Constructs a copy of <i>other</i>.</p>
<!-- @@@QCLKernel -->
<!-- $$$~QCLKernel[overload1]$$$~QCLKernel -->
<h3 class="fn"><a name="dtor.QCLKernel"></a>QCLKernel::~QCLKernel ()</h3>
<p>Releases this OpenCL kernel object. If this is the last reference to the kernel, it will be destroyed.</p>
<!-- @@@~QCLKernel -->
<!-- $$$argCount[overload1]$$$argCount -->
<h3 class="fn"><a name="argCount"></a>int QCLKernel::argCount () const</h3>
<p>Returns the number of arguments that are expected by this OpenCL kernel.</p>
<p>See also <a href="qclkernel.html#setArg">setArg</a>().</p>
<!-- @@@argCount -->
<!-- $$$bestLocalWorkSizeImage2D[overload1]$$$bestLocalWorkSizeImage2D -->
<h3 class="fn"><a name="bestLocalWorkSizeImage2D"></a><a href="qclworksize.html">QCLWorkSize</a> QCLKernel::bestLocalWorkSizeImage2D () const</h3>
<p>Returns the recommended best local work size for 2D image processing on this kernel. Default value is 8x8 unless the maximum work size is not large enough to accomodate 8x8 items.</p>
<p>See also <a href="qclkernel.html#bestLocalWorkSizeImage3D">bestLocalWorkSizeImage3D</a>().</p>
<!-- @@@bestLocalWorkSizeImage2D -->
<!-- $$$bestLocalWorkSizeImage3D[overload1]$$$bestLocalWorkSizeImage3D -->
<h3 class="fn"><a name="bestLocalWorkSizeImage3D"></a><a href="qclworksize.html">QCLWorkSize</a> QCLKernel::bestLocalWorkSizeImage3D () const</h3>
<p>Returns the recommended best local work size for 3D image processing on this kernel. Default value is 8x8x8 unless the maximum work size is not large enough to accomodate 8x8x8 items.</p>
<p>See also <a href="qclkernel.html#bestLocalWorkSizeImage2D">bestLocalWorkSizeImage2D</a>().</p>
<!-- @@@bestLocalWorkSizeImage3D -->
<!-- $$$context[overload1]$$$context -->
<h3 class="fn"><a name="context"></a><a href="qclcontext.html">QCLContext</a> * QCLKernel::context () const</h3>
<p>Returns the OpenCL context that this kernel was created within.</p>
<!-- @@@context -->
<!-- $$$declaredWorkGroupSize[overload1]$$$declaredWorkGroupSize -->
<h3 class="fn"><a name="declaredWorkGroupSize"></a><a href="qclworksize.html">QCLWorkSize</a> QCLKernel::declaredWorkGroupSize () const</h3>
<p>Returns the work group size that was declared in the kernel's source code using a <tt>reqd_work_group_size</tt> qualifier. Returns (0, 0, 0) if the size is not declared.</p>
<p>The default device for <a href="qclkernel.html#context">context</a>() is used to retrieve the work group size.</p>
<!-- @@@declaredWorkGroupSize -->
<!-- $$$declaredWorkGroupSize$$$declaredWorkGroupSizeconstQCLDevice& -->
<h3 class="fn"><a name="declaredWorkGroupSize-2"></a><a href="qclworksize.html">QCLWorkSize</a> QCLKernel::declaredWorkGroupSize ( const <a href="qcldevice.html">QCLDevice</a> &amp; <i>device</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns the work group size that was declared in the kernel's source code using a <tt>reqd_work_group_size</tt> qualifier. Returns (0, 0, 0) if the size is not declared.</p>
<p>The specified <i>device</i> is used to retrieve the work group size.</p>
<!-- @@@declaredWorkGroupSize -->
<!-- $$$globalWorkSize[overload1]$$$globalWorkSize -->
<h3 class="fn"><a name="globalWorkSize"></a><a href="qclworksize.html">QCLWorkSize</a> QCLKernel::globalWorkSize () const</h3>
<p>Returns the global work size for this instance of the kernel. The default value is 1.</p>
<p>See also <a href="qclkernel.html#setGlobalWorkSize">setGlobalWorkSize</a>() and <a href="qclkernel.html#localWorkSize">localWorkSize</a>().</p>
<!-- @@@globalWorkSize -->
<!-- $$$isNull[overload1]$$$isNull -->
<h3 class="fn"><a name="isNull"></a>bool QCLKernel::isNull () const</h3>
<p>Returns true if this OpenCL kernel object is null; false otherwise.</p>
<!-- @@@isNull -->
<!-- $$$kernelId[overload1]$$$kernelId -->
<h3 class="fn"><a name="kernelId"></a>cl_kernel QCLKernel::kernelId () const</h3>
<p>Returns the native OpenCL identifier for this kernel.</p>
<!-- @@@kernelId -->
<!-- $$$localWorkSize[overload1]$$$localWorkSize -->
<h3 class="fn"><a name="localWorkSize"></a><a href="qclworksize.html">QCLWorkSize</a> QCLKernel::localWorkSize () const</h3>
<p>Returns the local work size for this instance of the kernel. The default value is 0, which indicates that the local work size is not used.</p>
<p>See also <a href="qclkernel.html#setLocalWorkSize">setLocalWorkSize</a>() and <a href="qclkernel.html#globalWorkSize">globalWorkSize</a>().</p>
<!-- @@@localWorkSize -->
<!-- $$$name[overload1]$$$name -->
<h3 class="fn"><a name="name"></a>QString QCLKernel::name () const</h3>
<p>Returns the name of this OpenCL kernel's entry point function.</p>
<!-- @@@name -->
<!-- $$$preferredWorkSizeMultiple[overload1]$$$preferredWorkSizeMultiple -->
<h3 class="fn"><a name="preferredWorkSizeMultiple"></a>size_t QCLKernel::preferredWorkSizeMultiple () const</h3>
<p>Returns the preferred work group size multiple, which is a performance hint for the local work group size on OpenCL 1.1 systems. Returns zero if the system is OpenCL 1.0, or a preferred work group size multiple is not available.</p>
<!-- @@@preferredWorkSizeMultiple -->
<!-- $$$program[overload1]$$$program -->
<h3 class="fn"><a name="program"></a><a href="qclprogram.html">QCLProgram</a> QCLKernel::program () const</h3>
<p>Returns the OpenCL program that this kernel is associated with.</p>
<!-- @@@program -->
<!-- $$$run[overload1]$$$run -->
<h3 class="fn"><a name="run"></a><a href="qclevent.html">QCLEvent</a> QCLKernel::run ()</h3>
<p>Requests that this kernel instance be run on <a href="qclkernel.html#globalWorkSize">globalWorkSize</a>() items, optionally subdivided into work groups of <a href="qclkernel.html#localWorkSize">localWorkSize</a>() items.</p>
<p>Returns an event object that can be used to wait for the kernel to finish execution. The request is executed on the active command queue for <a href="qclkernel.html#context">context</a>().</p>
<p>See also <a href="qclkernel.html#operator-28-29">operator</a>()() and <a href="qclkernel.html#runInThread">runInThread</a>().</p>
<!-- @@@run -->
<!-- $$$run$$$runconstQCLEventList& -->
<h3 class="fn"><a name="run-2"></a><a href="qclevent.html">QCLEvent</a> QCLKernel::run ( const <a href="qcleventlist.html">QCLEventList</a> &amp; <i>after</i> )</h3>
<p>This is an overloaded function.</p>
<p>Requests that this kernel instance be run on <a href="qclkernel.html#globalWorkSize">globalWorkSize</a>() items, optionally subdivided into work groups of <a href="qclkernel.html#localWorkSize">localWorkSize</a>() items.</p>
<p>If <i>after</i> is not an empty list, it indicates the events that must be signaled as finished before this kernel instance can begin executing.</p>
<p>Returns an event object that can be used to wait for the kernel to finish execution. The request is executed on the active command queue for <a href="qclkernel.html#context">context</a>().</p>
<!-- @@@run -->
<!-- $$$runInThread[overload1]$$$runInThread -->
<h3 class="fn"><a name="runInThread"></a>QFuture&lt;void&gt; QCLKernel::runInThread ()</h3>
<p>Requests that this kernel instance be run on <a href="qclkernel.html#globalWorkSize">globalWorkSize</a>() items, optionally subdivided into work groups of <a href="qclkernel.html#localWorkSize">localWorkSize</a>() items. The kernel will be enqueued and executed in a background thread.</p>
<p>Returns a QFuture object that can be used to wait for the kernel to finish execution. The request is executed on the active command queue for <a href="qclkernel.html#context">context</a>().</p>
<p>Usually runInThread() is called implicitly via <a href="qtconcurrent.html#run">QtConcurrent::run</a>():</p>
<pre class="highlightedCode brush: cpp">    kernel.setGlobalWorkSize(100, 100);
    QFuture&lt;void&gt; future = QtConcurrent::run(kernel, a1, b1);
    future.waitForFinished();</pre>
<p>The kernel object must not be reused until the background thread finishes execution of the kernel. Thus, the following code will have unexpected effects:</p>
<pre class="highlightedCode brush: cpp">    QFuture&lt;void&gt; future1 = QtConcurrent::run(kernel, a1, b1);
    QFuture&lt;void&gt; future2 = QtConcurrent::run(kernel, a2, b2);
    future1.waitForFinished();
    future2.waitForFinished();</pre>
<p>The recommended method to run the same kernel multiple times in a background thread is as follows:</p>
<pre class="highlightedCode brush: cpp">    void runKernelTwice(QCLKernel &amp;kernel)
    {
        kernel(a1, b1);
        kernel(a2, b2).waitForFinished();
    }

    QFuture&lt;void&gt; future = QtConcurrent::run(runKernelTwice, kernel);</pre>
<p>See also <a href="qclkernel.html#run">run</a>().</p>
<!-- @@@runInThread -->
<!-- $$$setArg[overload1]$$$setArgintcl_int -->
<h3 class="fn"><a name="setArg"></a>void QCLKernel::setArg ( int <i>index</i>, cl_int <i>value</i> )</h3>
<p>Sets argument <i>index</i> for this kernel to <i>value</i>.</p>
<p>The argument is assumed to have been declared with the type <tt>int</tt>.</p>
<!-- @@@setArg -->
<!-- $$$setArg$$$setArgintcl_uint -->
<h3 class="fn"><a name="setArg-2"></a>void QCLKernel::setArg ( int <i>index</i>, cl_uint <i>value</i> )</h3>
<p>Sets argument <i>index</i> for this kernel to <i>value</i>.</p>
<p>The argument is assumed to have been declared with the type <tt>uint</tt>.</p>
<!-- @@@setArg -->
<!-- $$$setArg$$$setArgintcl_long -->
<h3 class="fn"><a name="setArg-3"></a>void QCLKernel::setArg ( int <i>index</i>, cl_long <i>value</i> )</h3>
<p>Sets argument <i>index</i> for this kernel to <i>value</i>.</p>
<p>The argument is assumed to have been declared with the type <tt>long</tt>.</p>
<!-- @@@setArg -->
<!-- $$$setArg$$$setArgintcl_ulong -->
<h3 class="fn"><a name="setArg-4"></a>void QCLKernel::setArg ( int <i>index</i>, cl_ulong <i>value</i> )</h3>
<p>Sets argument <i>index</i> for this kernel to <i>value</i>.</p>
<p>The argument is assumed to have been declared with the type <tt>ulong</tt>.</p>
<!-- @@@setArg -->
<!-- $$$setArg$$$setArgintfloat -->
<h3 class="fn"><a name="setArg-5"></a>void QCLKernel::setArg ( int <i>index</i>, float <i>value</i> )</h3>
<p>Sets argument <i>index</i> for this kernel to <i>value</i>.</p>
<p>The argument is assumed to have been declared with the type <tt>float</tt>.</p>
<!-- @@@setArg -->
<!-- $$$setArg$$$setArgintconstQVector2D& -->
<h3 class="fn"><a name="setArg-6"></a>void QCLKernel::setArg ( int <i>index</i>, const QVector2D &amp; <i>value</i> )</h3>
<p>Sets argument <i>index</i> for this kernel to <i>value</i>.</p>
<p>The argument is assumed to have been declared with the type <tt>float2</tt>.</p>
<!-- @@@setArg -->
<!-- $$$setArg$$$setArgintconstQVector3D& -->
<h3 class="fn"><a name="setArg-7"></a>void QCLKernel::setArg ( int <i>index</i>, const QVector3D &amp; <i>value</i> )</h3>
<p>Sets argument <i>index</i> for this kernel to <i>value</i>.</p>
<p>The argument is assumed to have been declared with the type <tt>float4</tt> (OpenCL does not have a <tt>float3</tt> type). The value will be passed to the kernel as (x, y, z, 1).</p>
<!-- @@@setArg -->
<!-- $$$setArg$$$setArgintconstQVector4D& -->
<h3 class="fn"><a name="setArg-8"></a>void QCLKernel::setArg ( int <i>index</i>, const QVector4D &amp; <i>value</i> )</h3>
<p>Sets argument <i>index</i> for this kernel to <i>value</i>.</p>
<p>The argument is assumed to have been declared with the type <tt>float4</tt>.</p>
<!-- @@@setArg -->
<!-- $$$setArg$$$setArgintconstQColor& -->
<h3 class="fn"><a name="setArg-9"></a>void QCLKernel::setArg ( int <i>index</i>, const QColor &amp; <i>value</i> )</h3>
<p>Sets argument <i>index</i> for this kernel to <i>value</i>.</p>
<p>The argument is assumed to have been declared with the type <tt>float4</tt> as is passed the red, green, blue, and alpha components of <i>value</i> as floating-point values between 0 and 1.</p>
<!-- @@@setArg -->
<!-- $$$setArg$$$setArgintQt::GlobalColor -->
<h3 class="fn"><a name="setArg-10"></a>void QCLKernel::setArg ( int <i>index</i>, Qt::GlobalColor <i>value</i> )</h3>
<p>Sets argument <i>index</i> for this kernel to <i>value</i>.</p>
<p>The argument is assumed to have been declared with the type <tt>float4</tt> as is passed the red, green, blue, and alpha components of <i>value</i> as floating-point values between 0 and 1.</p>
<!-- @@@setArg -->
<!-- $$$setArg$$$setArgintconstQPoint& -->
<h3 class="fn"><a name="setArg-11"></a>void QCLKernel::setArg ( int <i>index</i>, const QPoint &amp; <i>value</i> )</h3>
<p>Sets argument <i>index</i> for this kernel to <i>value</i>.</p>
<p>The argument is assumed to have been declared with the type <tt>int2</tt>.</p>
<!-- @@@setArg -->
<!-- $$$setArg$$$setArgintconstQPointF& -->
<h3 class="fn"><a name="setArg-12"></a>void QCLKernel::setArg ( int <i>index</i>, const QPointF &amp; <i>value</i> )</h3>
<p>Sets argument <i>index</i> for this kernel to <i>value</i>.</p>
<p>The argument is assumed to have been declared with the type <tt>float2</tt>.</p>
<!-- @@@setArg -->
<!-- $$$setArg$$$setArgintconstQMatrix4x4& -->
<h3 class="fn"><a name="setArg-13"></a>void QCLKernel::setArg ( int <i>index</i>, const QMatrix4x4 &amp; <i>value</i> )</h3>
<p>Sets argument <i>index</i> for this kernel to <i>value</i>.</p>
<p>The argument is assumed to have been declared with the type <tt>float16</tt>.</p>
<!-- @@@setArg -->
<!-- $$$setArg$$$setArgintconstQCLMemoryObject& -->
<h3 class="fn"><a name="setArg-14"></a>void QCLKernel::setArg ( int <i>index</i>, const <a href="qclmemoryobject.html">QCLMemoryObject</a> &amp; <i>value</i> )</h3>
<p>Sets argument <i>index</i> for this kernel to <i>value</i>.</p>
<p>The argument is assumed to have been declared with the type <tt>image2d_t</tt>, <tt>image3d_t</tt>, or be a pointer to a buffer, according to the type of memory object represented by <i>value</i>.</p>
<!-- @@@setArg -->
<!-- $$$setArg$$$setArgintconstQCLVector<T>& -->
<h3 class="fn"><a name="setArg-15"></a>void QCLKernel::setArg ( int <i>index</i>, const <a href="qclvector.html">QCLVector</a>&lt;T&gt; &amp; <i>value</i> )</h3>
<p>Sets argument <i>index</i> for this kernel to <i>value</i>.</p>
<p>The argument is assumed to have been declared as a pointer to a buffer.</p>
<!-- @@@setArg -->
<!-- $$$setArg$$$setArgintconstQCLSampler& -->
<h3 class="fn"><a name="setArg-16"></a>void QCLKernel::setArg ( int <i>index</i>, const <a href="qclsampler.html">QCLSampler</a> &amp; <i>value</i> )</h3>
<p>Sets argument <i>index</i> for this kernel to <i>value</i>.</p>
<p>The argument is assumed to have been declared with the type <tt>sampler_t</tt>.</p>
<!-- @@@setArg -->
<!-- $$$setArg$$$setArgintconstvoid*size_t -->
<h3 class="fn"><a name="setArg-17"></a>void QCLKernel::setArg ( int <i>index</i>, const void * <i>data</i>, size_t <i>size</i> )</h3>
<p>Sets argument <i>index</i> to the <i>size</i> bytes at <i>data</i>.</p>
<!-- @@@setArg -->
<!-- $$$setGlobalWorkSize[overload1]$$$setGlobalWorkSizeconstQCLWorkSize& -->
<h3 class="fn"><a name="setGlobalWorkSize"></a>void QCLKernel::setGlobalWorkSize ( const <a href="qclworksize.html">QCLWorkSize</a> &amp; <i>size</i> )</h3>
<p>Sets the global work size for this instance of the kernel to <i>size</i>.</p>
<p>See also <a href="qclkernel.html#globalWorkSize">globalWorkSize</a>(), <a href="qclkernel.html#setLocalWorkSize">setLocalWorkSize</a>(), and <a href="qclkernel.html#setRoundedGlobalWorkSize">setRoundedGlobalWorkSize</a>().</p>
<!-- @@@setGlobalWorkSize -->
<!-- $$$setGlobalWorkSize$$$setGlobalWorkSizesize_tsize_t -->
<h3 class="fn"><a name="setGlobalWorkSize-2"></a>void QCLKernel::setGlobalWorkSize ( size_t <i>width</i>, size_t <i>height</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the global work size for this instance of the kernel to <i>width</i> x <i>height</i>.</p>
<!-- @@@setGlobalWorkSize -->
<!-- $$$setGlobalWorkSize$$$setGlobalWorkSizesize_tsize_tsize_t -->
<h3 class="fn"><a name="setGlobalWorkSize-3"></a>void QCLKernel::setGlobalWorkSize ( size_t <i>width</i>, size_t <i>height</i>, size_t <i>depth</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the global work size for this instance of the kernel to <i>width</i> x <i>height</i> x <i>depth</i>.</p>
<!-- @@@setGlobalWorkSize -->
<!-- $$$setLocalWorkSize[overload1]$$$setLocalWorkSizeconstQCLWorkSize& -->
<h3 class="fn"><a name="setLocalWorkSize"></a>void QCLKernel::setLocalWorkSize ( const <a href="qclworksize.html">QCLWorkSize</a> &amp; <i>size</i> )</h3>
<p>Sets the local work size for this instance of the kernel to <i>size</i>.</p>
<p>See also <a href="qclkernel.html#localWorkSize">localWorkSize</a>() and <a href="qclkernel.html#setGlobalWorkSize">setGlobalWorkSize</a>().</p>
<!-- @@@setLocalWorkSize -->
<!-- $$$setLocalWorkSize$$$setLocalWorkSizesize_tsize_t -->
<h3 class="fn"><a name="setLocalWorkSize-2"></a>void QCLKernel::setLocalWorkSize ( size_t <i>width</i>, size_t <i>height</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the local work size for this instance of the kernel to <i>width</i> x <i>height</i>.</p>
<!-- @@@setLocalWorkSize -->
<!-- $$$setLocalWorkSize$$$setLocalWorkSizesize_tsize_tsize_t -->
<h3 class="fn"><a name="setLocalWorkSize-3"></a>void QCLKernel::setLocalWorkSize ( size_t <i>width</i>, size_t <i>height</i>, size_t <i>depth</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the local work size for this instance of the kernel to <i>width</i> x <i>height</i> x <i>depth</i>.</p>
<!-- @@@setLocalWorkSize -->
<!-- $$$setRoundedGlobalWorkSize[overload1]$$$setRoundedGlobalWorkSizeconstQCLWorkSize& -->
<h3 class="fn"><a name="setRoundedGlobalWorkSize"></a>void QCLKernel::setRoundedGlobalWorkSize ( const <a href="qclworksize.html">QCLWorkSize</a> &amp; <i>size</i> )</h3>
<p>Sets the global work size for this instance of the kernel to <i>size</i>, after rounding it up to the next multiple of <a href="qclkernel.html#localWorkSize">localWorkSize</a>().</p>
<p>See also <a href="qclkernel.html#globalWorkSize">globalWorkSize</a>() and <a href="qclworksize.html#roundTo">QCLWorkSize::roundTo</a>().</p>
<!-- @@@setRoundedGlobalWorkSize -->
<!-- $$$setRoundedGlobalWorkSize$$$setRoundedGlobalWorkSizesize_tsize_t -->
<h3 class="fn"><a name="setRoundedGlobalWorkSize-2"></a>void QCLKernel::setRoundedGlobalWorkSize ( size_t <i>width</i>, size_t <i>height</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the global work size for this instance of the kernel to <i>width</i> x <i>height</i>, after rounding it up to the next multiple of <a href="qclkernel.html#localWorkSize">localWorkSize</a>().</p>
<!-- @@@setRoundedGlobalWorkSize -->
<!-- $$$setRoundedGlobalWorkSize$$$setRoundedGlobalWorkSizesize_tsize_tsize_t -->
<h3 class="fn"><a name="setRoundedGlobalWorkSize-3"></a>void QCLKernel::setRoundedGlobalWorkSize ( size_t <i>width</i>, size_t <i>height</i>, size_t <i>depth</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the global work size for this instance of the kernel to <i>width</i> x <i>height</i> x <i>depth</i>, after rounding it up to the next multiple of <a href="qclkernel.html#localWorkSize">localWorkSize</a>().</p>
<!-- @@@setRoundedGlobalWorkSize -->
<!-- $$$operator!=[overload1]$$$operator!=constQCLKernel& -->
<h3 class="fn"><a name="operator-not-eq"></a>bool QCLKernel::operator!= ( const QCLKernel &amp; <i>other</i> ) const</h3>
<p>Returns true if this OpenCL kernel object does not have the same identifier as <i>other</i>; false otherwise.</p>
<p>See also <a href="qclkernel.html#operator-eq-eq">operator==</a>() and <a href="qclkernel.html#kernelId">kernelId</a>().</p>
<!-- @@@operator!= -->
<!-- $$$operator()[overload1]$$$operator() -->
<h3 class="fn"><a name="operator-28-29"></a><a href="qclevent.html">QCLEvent</a> QCLKernel::operator() ()</h3>
<p>Runs this kernel instance with zero arguments. Returns an event object that can be used to wait for the kernel to finish execution.</p>
<!-- @@@operator() -->
<!-- $$$operator()$$$operator()constT1& -->
<h3 class="fn"><a name="operator-28-29-2"></a><a href="qclevent.html">QCLEvent</a> QCLKernel::operator() ( const T1 &amp; <i>arg1</i> )</h3>
<p>Runs this kernel instance with the argument <i>arg1</i>. Returns an event object that can be used to wait for the kernel to finish execution.</p>
<!-- @@@operator() -->
<!-- $$$operator()$$$operator()constT1&constT2& -->
<h3 class="fn"><a name="operator-28-29-3"></a><a href="qclevent.html">QCLEvent</a> QCLKernel::operator() ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i> )</h3>
<p>Runs this kernel instance with the arguments <i>arg1</i> and <i>arg2</i>. Returns an event object that can be used to wait for the kernel to finish execution.</p>
<!-- @@@operator() -->
<!-- $$$operator()$$$operator()constT1&constT2&constT3& -->
<h3 class="fn"><a name="operator-28-29-4"></a><a href="qclevent.html">QCLEvent</a> QCLKernel::operator() ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i>, const T3 &amp; <i>arg3</i> )</h3>
<p>Runs this kernel instance with the arguments <i>arg1</i>, <i>arg2</i>, and <i>arg3</i>. Returns an event object that can be used to wait for the kernel to finish execution.</p>
<!-- @@@operator() -->
<!-- $$$operator()$$$operator()constT1&constT2&constT3&constT4& -->
<h3 class="fn"><a name="operator-28-29-5"></a><a href="qclevent.html">QCLEvent</a> QCLKernel::operator() ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i>, const T3 &amp; <i>arg3</i>, const T4 &amp; <i>arg4</i> )</h3>
<p>Runs this kernel instance with the arguments <i>arg1</i>, <i>arg2</i>, <i>arg3</i>, and <i>arg4</i>. Returns an event object that can be used to wait for the kernel to finish execution.</p>
<!-- @@@operator() -->
<!-- $$$operator()$$$operator()constT1&constT2&constT3&constT4&constT5& -->
<h3 class="fn"><a name="operator-28-29-6"></a><a href="qclevent.html">QCLEvent</a> QCLKernel::operator() ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i>, const T3 &amp; <i>arg3</i>, const T4 &amp; <i>arg4</i>, const T5 &amp; <i>arg5</i> )</h3>
<p>Runs this kernel instance with the arguments <i>arg1</i>, <i>arg2</i>, <i>arg3</i>, <i>arg4</i>, and <i>arg5</i>. Returns an event object that can be used to wait for the kernel to finish execution.</p>
<!-- @@@operator() -->
<!-- $$$operator()$$$operator()constT1&constT2&constT3&constT4&constT5&constT6& -->
<h3 class="fn"><a name="operator-28-29-7"></a><a href="qclevent.html">QCLEvent</a> QCLKernel::operator() ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i>, const T3 &amp; <i>arg3</i>, const T4 &amp; <i>arg4</i>, const T5 &amp; <i>arg5</i>, const T6 &amp; <i>arg6</i> )</h3>
<p>Runs this kernel instance with the arguments <i>arg1</i>, <i>arg2</i>, <i>arg3</i>, <i>arg4</i>, <i>arg5</i>, and <i>arg6</i>. Returns an event object that can be used to wait for the kernel to finish execution.</p>
<!-- @@@operator() -->
<!-- $$$operator()$$$operator()constT1&constT2&constT3&constT4&constT5&constT6&constT7& -->
<h3 class="fn"><a name="operator-28-29-8"></a><a href="qclevent.html">QCLEvent</a> QCLKernel::operator() ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i>, const T3 &amp; <i>arg3</i>, const T4 &amp; <i>arg4</i>, const T5 &amp; <i>arg5</i>, const T6 &amp; <i>arg6</i>, const T7 &amp; <i>arg7</i> )</h3>
<p>Runs this kernel instance with the arguments <i>arg1</i>, <i>arg2</i>, <i>arg3</i>, <i>arg4</i>, <i>arg5</i>, <i>arg6</i>, and <i>arg7</i>. Returns an event object that can be used to wait for the kernel to finish execution.</p>
<!-- @@@operator() -->
<!-- $$$operator()$$$operator()constT1&constT2&constT3&constT4&constT5&constT6&constT7&constT8& -->
<h3 class="fn"><a name="operator-28-29-9"></a><a href="qclevent.html">QCLEvent</a> QCLKernel::operator() ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i>, const T3 &amp; <i>arg3</i>, const T4 &amp; <i>arg4</i>, const T5 &amp; <i>arg5</i>, const T6 &amp; <i>arg6</i>, const T7 &amp; <i>arg7</i>, const T8 &amp; <i>arg8</i> )</h3>
<p>Runs this kernel instance with the arguments <i>arg1</i>, <i>arg2</i>, <i>arg3</i>, <i>arg4</i>, <i>arg5</i>, <i>arg6</i>, <i>arg7</i>, and <i>arg8</i>. Returns an event object that can be used to wait for the kernel to finish execution.</p>
<!-- @@@operator() -->
<!-- $$$operator()$$$operator()constT1&constT2&constT3&constT4&constT5&constT6&constT7&constT8&constT9& -->
<h3 class="fn"><a name="operator-28-29-10"></a><a href="qclevent.html">QCLEvent</a> QCLKernel::operator() ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i>, const T3 &amp; <i>arg3</i>, const T4 &amp; <i>arg4</i>, const T5 &amp; <i>arg5</i>, const T6 &amp; <i>arg6</i>, const T7 &amp; <i>arg7</i>, const T8 &amp; <i>arg8</i>, const T9 &amp; <i>arg9</i> )</h3>
<p>Runs this kernel instance with the arguments <i>arg1</i>, <i>arg2</i>, <i>arg3</i>, <i>arg4</i>, <i>arg5</i>, <i>arg6</i>, <i>arg7</i>, <i>arg8</i>, and <i>arg9</i>. Returns an event object that can be used to wait for the kernel to finish execution.</p>
<!-- @@@operator() -->
<!-- $$$operator()$$$operator()constT1&constT2&constT3&constT4&constT5&constT6&constT7&constT8&constT9&constT10& -->
<h3 class="fn"><a name="operator-28-29-11"></a><a href="qclevent.html">QCLEvent</a> QCLKernel::operator() ( const T1 &amp; <i>arg1</i>, const T2 &amp; <i>arg2</i>, const T3 &amp; <i>arg3</i>, const T4 &amp; <i>arg4</i>, const T5 &amp; <i>arg5</i>, const T6 &amp; <i>arg6</i>, const T7 &amp; <i>arg7</i>, const T8 &amp; <i>arg8</i>, const T9 &amp; <i>arg9</i>, const T10 &amp; <i>arg10</i> )</h3>
<p>Runs this kernel instance with the arguments <i>arg1</i>, <i>arg2</i>, <i>arg3</i>, <i>arg4</i>, <i>arg5</i>, <i>arg6</i>, <i>arg7</i>, <i>arg8</i>, <i>arg9</i>, and <i>arg10</i>. Returns an event object that can be used to wait for the kernel to finish execution.</p>
<!-- @@@operator() -->
<!-- $$$operator=[overload1]$$$operator=constQCLKernel& -->
<h3 class="fn"><a name="operator-eq"></a>QCLKernel &amp; QCLKernel::operator= ( const QCLKernel &amp; <i>other</i> )</h3>
<p>Assigns <i>other</i> to this object.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQCLKernel& -->
<h3 class="fn"><a name="operator-eq-eq"></a>bool QCLKernel::operator== ( const QCLKernel &amp; <i>other</i> ) const</h3>
<p>Returns true if this OpenCL kernel object has the same identifier as <i>other</i>; false otherwise.</p>
<p>Note: this operator checks for equality solely on <a href="qclkernel.html#kernelId">kernelId</a>(). The two objects may have different global and local work sizes.</p>
<p>See also <a href="qclkernel.html#operator-not-eq">operator!=</a>() and <a href="qclkernel.html#kernelId">kernelId</a>().</p>
<!-- @@@operator== -->
</div>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td align="left">Copyright &copy; 2010 Nokia Corporation</td>
<td align="right">QtOpenCL Documentation</td>
</tr></table></div></address>  <script src="scripts/functions.js" type="text/javascript"></script>
  <script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-4457116-5']);
  _gaq.push(['_trackPageview']);
  (function() {
  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
  </script>
</body>
</html>
